Mark disk wwn and nvram arguments as computed #1064
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes are meant to keep the libvirt provider idempotent, i.e. running terraform apply twice with no changes in between should not result in any updated resources.
The disk WWN is randomly generated if it is not specified, which means that the
disk.wwn
argument will always be different when it is regenerated. This difference causes Terraform to perform an in-place update.When specifying the
firmware
argument, libvirt will automatically generate the corresponding NVRAM definitions. Since the generated definitions differ from the unspecifiednvram
argument in the resource and thenvram
argument is marked as force new, Terraform will replace the entire libvirt domain.The
nvram.file
argument was required, but this is not necessary for libvirt. Libvirt will autogenerate the location of the NVRAM variables file even if only the template is specified.